<!DOCTYPE html>
<html lang="zh-Hans" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>患者穿刺信息</title>
    <div th:replace="cqzd/common/common-resource :: global-header"></div>
</head>
<body>
<div style="padding:5px;">
    <div class="search-condition">
        <div class="list">
            <div id="form1">
                <table style="width:80%;padding:5px;" class="table" >
                    <tr>
                        <td class="form_label">
                            穿刺时间:
                        </td>
                        <td colspan="3">
                            <table style="border: 0px; background-color: transparent"
                                   border="0" cellspacing="0" cellpadding="0">
                                <tr style="border: 0px none; background-color: transparent;">
                                    <td style="border: 0px none; background-color: transparent;">
                                    </td>
                                    <td style="border: 0px none; background-color: transparent;">
                                        <input id="statrDate" class="mini-datepicker" name="starDate"
                                               format="yyyy-MM-dd" timeFormat="H:mm:ss"
                                               showTime="true"
                                               style="width: 200px"  />
                                    </td>
                                    <td style="border: 0px none; background-color: transparent;">
                                        到:</td>
                                    <td style="border: 0px none; background-color: transparent;">
                                        <input class="mini-datepicker" name="endDate"
                                               format="yyyy-MM-dd" timeFormat="H:mm:ss"
                                               showTime="true"
                                               style="width: 200px"ondrawdate="onDrawDate"  />
                            </table>
                        </td>


                        <td class="btn-wrap">
                            <input class="mini-button" text="查询" onclick="search" iconCls="icon-search"/>
                        </td>
                        <td class="btn-wrap">
                            <input class="mini-button" text="导出" onclick="export_file" iconCls="icon-search"/>
                        </td>

                    </tr>

                </table>
            </div>
        </div>
    </div>
</div>


<div class="mini-fit" style="padding:0px 5px 5px 5px;">
    <div ajaxOptions="{type : 'get'}" id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;"
         url="cqzd/patientInfo/getPuncture" dataField="data" idField="id" pageSize="25" sizeList="[25,50,100]" multiSelect="true">
        <div property="columns">
            <div field="recordId" width="120" headerAlign="center" align="center" allowSort="false">登记编号</div>
            <div field="patientName" width="120" headerAlign="center" align="center" allowSort="false">患者姓名</div>
            <div field="patientCardId" width="120" headerAlign="center" align="center" allowSort="false">身份证号</div>
            <div field="patientAge" width="120" headerAlign="center" align="center" allowSort="false">患者年龄</div>
            <div field="assayRemark" width="120" headerAlign="center" align="center" allowSort="false">穿刺指征</div>
            <div field="inspectionItem" width="120" headerAlign="center" align="center" allowSort="false" >穿刺类型</div>
            <div field="inspectionTime" width="120" headerAlign="center" align="center" allowSort="false" dateFormat="yyyy-MM-dd">穿刺时间</div>
        </div>
    </div>
</div>

<script type="text/javascript">
    txkui.parse();

    var moduleUlr="cqzd/do/diacinfo/",modulePageUlr= getHtmlPageUrl("diacrisis");
    var form = new mini.Form("#form1");
    var grid = mini.get("datagrid1");
    (function(){
        grid.load();
    })();

    function export_file(){
        // mini.showTips({
        //     content:"数据量较大,正在准备数据,请耐心稍等...",
        //     state: "warning",
        //     x: "center",
        //     y: "top",
        //     timeout: 60000});
        // form.validate();
        // if (form.isValid()===false) return;
        //
        // var formData = form.getData(true, true);
        // HttpUtil.standardPost('/cqzd/patientInfo/getPunctureExport',formData);
        // window.open("/cqzd/patientInfo/getPunctureExport");

        var formData = form.getData(true, true);
        HttpUtil.standardPost("/cqzd/patientInfo/getPunctureExport",formData)
    }

    function onValueChanged() {
        search();
    }


    function search(){
        //校验
        form.validate();
        if (form.isValid()===false) return;

        var formData = form.getData(true, true);

        //var json = mini.encode(formData);
        grid.load(formData);
    }

    function resetForm(){
        form.reset();
    }



</script>

</body>
</html>
